package operations;

import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.io.IOException;

public class Paste extends FormatOperations
{
public String performOperation()
{
	String returnString="";
	clipboard=Toolkit.getDefaultToolkit().getSystemClipboard();
	Transferable clipboardData=clipboard.getContents(clipboardString);
    try
    {
    	returnString=(String)clipboardData.getTransferData(DataFlavor.stringFlavor);
	} 
    catch (UnsupportedFlavorException e)
    {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
    catch (IOException e)
	{
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
    return returnString;
	
}
}
